 package CurtainDesign.utils;

 import CurtainDesign.Constants;
 import NewOrderXmlbean.Orderinfo;

 public class Translator
 {
   public static void chinese2English(Orderinfo orderinfo)
   {
     String winType = orderinfo.getWindowtype();
     for (int i = 0; (i < Constants.STYLES.length) && (!CurtainChecker.isEmpty(winType)); i++) {
       if (winType.trim().equalsIgnoreCase(Constants.STYLES[i])) {
         orderinfo.setWindowtype(Constants.STYLES_EN[i]);
         break;
       }
     }

     String clientRegion = orderinfo.getClientregion();
     for (int i = 0; (i < Constants.CLIENTREGION.length) && (!CurtainChecker.isEmpty(clientRegion)); i++) {
       if (clientRegion.trim().equalsIgnoreCase(Constants.CLIENTREGION[i])) {
         orderinfo.setClientregion(Constants.CLIENTREGION_EN[i]);
         break;
       }
     }

     String wood = orderinfo.getWoodoption();
     for (int i = 0; (i < Constants.WOODOPTION.length) && (!CurtainChecker.isEmpty(wood)); i++) {
       if (wood.trim().equalsIgnoreCase(Constants.WOODOPTION[i])) {
         orderinfo.setWoodoption(Constants.WOODOPTION_EN[i]);
         break;
       }
     }

     String color = orderinfo.getColor();
     for (int i = 0; (i < Constants.COLOR.length) && (!CurtainChecker.isEmpty(color)); i++) {
       if (color.trim().equalsIgnoreCase(Constants.COLOR[i])) {
         orderinfo.setColor(Constants.COLOR_EN[i]);
         break;
       }
     }

     String install = orderinfo.getInstall();
     for (int i = 0; (i < Constants.INSTALL.length) && (!CurtainChecker.isEmpty(install)); i++) {
       if (install.trim().equalsIgnoreCase(Constants.INSTALL[i])) {
         orderinfo.setInstall(Constants.INSTALL_EN[i]);
         break;
       }
     }

     String hingeColor = orderinfo.getHingecolor();
     for (int i = 0; (i < Constants.HINGECOLOR.length) && (!CurtainChecker.isEmpty(hingeColor)); i++) {
       if (hingeColor.equalsIgnoreCase(Constants.HINGECOLOR[i])) {
         orderinfo.setHingecolor(Constants.HINGECOLOR_EN[i]);
         break;
       }
     }

     String framePos = orderinfo.getFramenumpos();
     for (int i = 0; (i < Constants.FRAMENUMPOS.length) && (!CurtainChecker.isEmpty(framePos)); i++) {
       if (framePos.trim().equalsIgnoreCase(Constants.FRAMENUMPOS[i])) {
         orderinfo.setFramenumpos(Constants.FRAMENUMPOS_EN[i]);
         break;
       }
     }

     String fameType = orderinfo.getFrametype();
     for (int i = 0; (i < Constants.FRAMETYPE.length) && (!CurtainChecker.isEmpty(fameType)); i++) {
       if (fameType.trim().equalsIgnoreCase(Constants.FRAMETYPE[i])) {
         orderinfo.setFrametype(Constants.FRAMETYPE_EN[i]);
         break;
       }
     }

     String pullBarType = orderinfo.getPullbartype();
     for (int i = 0; (i < Constants.PULLBARTYPE.length) && (!CurtainChecker.isEmpty(pullBarType)); i++) {
       if (pullBarType.trim().equalsIgnoreCase(Constants.PULLBARTYPE[i])) {
         orderinfo.setPullbartype(Constants.PULLBARTYPE_EN[i]);
         break;
       }
     }

     String tPoleType = orderinfo.getTpoletype();
     for (int i = 0; (i < Constants.T_POLE_TYPE.length) && (!CurtainChecker.isEmpty(tPoleType)); i++)
       if (tPoleType.trim().equalsIgnoreCase(Constants.T_POLE_TYPE[i])) {
         orderinfo.setTpoletype(Constants.T_POLE_TYPE_EN[i]);
         break;
       }
   }

   public static void english2Chinese(Orderinfo orderinfo)
   {
     String winType = orderinfo.getWindowtype();
     for (int i = 0; (i < Constants.STYLES_EN.length) && (!CurtainChecker.isEmpty(winType)); i++) {
       if (winType.trim().equalsIgnoreCase(Constants.STYLES_EN[i])) {
         orderinfo.setWindowtype(Constants.STYLES[i]);
         break;
       }
     }

     String clientRegion = orderinfo.getClientregion();
     for (int i = 0; (i < Constants.CLIENTREGION_EN.length) && (!CurtainChecker.isEmpty(clientRegion)); i++) {
       if (clientRegion.trim().equalsIgnoreCase(Constants.CLIENTREGION_EN[i])) {
         orderinfo.setClientregion(Constants.CLIENTREGION[i]);
         break;
       }
     }

     String wood = orderinfo.getWoodoption();
     for (int i = 0; (i < Constants.WOODOPTION_EN.length) && (!CurtainChecker.isEmpty(wood)); i++) {
       if (wood.trim().equalsIgnoreCase(Constants.WOODOPTION_EN[i])) {
         orderinfo.setWoodoption(Constants.WOODOPTION[i]);
         break;
       }
     }

     String color = orderinfo.getColor();
     for (int i = 0; (i < Constants.COLOR_EN.length) && (!CurtainChecker.isEmpty(color)); i++) {
       if (color.equalsIgnoreCase(Constants.COLOR_EN[i])) {
         orderinfo.setColor(Constants.COLOR[i]);
         break;
       }
     }

     String install = orderinfo.getInstall();
     for (int i = 0; (i < Constants.INSTALL_EN.length) && (!CurtainChecker.isEmpty(install)); i++) {
       if (install.trim().equalsIgnoreCase(Constants.INSTALL_EN[i])) {
         orderinfo.setInstall(Constants.INSTALL[i]);
         break;
       }
     }

     String hingeColor = orderinfo.getHingecolor();
     for (int i = 0; (i < Constants.HINGECOLOR_EN.length) && (!CurtainChecker.isEmpty(hingeColor)); i++) {
       if (hingeColor.trim().equalsIgnoreCase(Constants.HINGECOLOR_EN[i])) {
         orderinfo.setHingecolor(Constants.HINGECOLOR[i]);
         break;
       }
     }

     String framePos = orderinfo.getFramenumpos();
     for (int i = 0; (i < Constants.FRAMENUMPOS_EN.length) && (!CurtainChecker.isEmpty(framePos)); i++) {
       if (framePos.trim().equalsIgnoreCase(Constants.FRAMENUMPOS_EN[i])) {
         orderinfo.setFramenumpos(Constants.FRAMENUMPOS[i]);
         break;
       }
     }

     String fameType = orderinfo.getFrametype();
     for (int i = 0; (i < Constants.FRAMETYPE_EN.length) && (!CurtainChecker.isEmpty(fameType)); i++) {
       if (fameType.trim().equalsIgnoreCase(Constants.FRAMETYPE_EN[i])) {
         orderinfo.setFrametype(Constants.FRAMETYPE[i]);
         break;
       }
     }

     String pullBarType = orderinfo.getPullbartype();
     for (int i = 0; (i < Constants.PULLBARTYPE_EN.length) && (!CurtainChecker.isEmpty(pullBarType)); i++) {
       if (pullBarType.trim().equalsIgnoreCase(Constants.PULLBARTYPE_EN[i])) {
         orderinfo.setPullbartype(Constants.PULLBARTYPE[i]);
         break;
       }
     }

     String tPoleType = orderinfo.getTpoletype();
     for (int i = 0; (i < Constants.T_POLE_TYPE_EN.length) && (!CurtainChecker.isEmpty(tPoleType)); i++)
       if (tPoleType.trim().equalsIgnoreCase(Constants.T_POLE_TYPE_EN[i])) {
         orderinfo.setTpoletype(Constants.T_POLE_TYPE[i]);
         break;
       }
   }
 }

/* Location:           C:\Users\Administrator\Desktop\奥特百叶窗\Shutter DesignerV3.1\CurtainDesign.jar
 * Qualified Name:     CurtainDesign.utils.Translator
 * JD-Core Version:    0.6.0
 */